﻿

COMPUTE weight=S017.
EXECUTE.

*country year is S025 (no splits)*

*year is of survey is S020**

*country is S003*

*demographics*


RECODE X001 (1=-.5) (2=.5) INTO sex.
EXECUTE.

do if X003>=13.
compute age1s=(X003-13)/86.
end if.
execute.

recode X025 (-3=0) (1=0) (2 thru 3=.25) (5=.25) (4=.5) (6=.5) (7=.75) (8=1) into edu5c.
execute. 

do if x047>=1 & x047<=10.
compute hhincdecile=(x047-1)/9.
end if.
execute.



*POLITICAL ENGAGEMENT*

do if A004>=1 & A004<=4.
compute politimp = 1-((A004-1)/3).
end if.
execute.



do if E023>=1 & E023<=4.
compute politint = 1-((E023-1)/3).
end if.
execute.

*svs*

do if A189>=1 & A189<=6.
compute svsselfdirection=1-((A189-1)/5).
end if.
execute.


do if A190>=1 & A190<=6.
compute svswealth=1-((A190-1)/5).
end if.
execute.

do if A191>=1 & A191<=6.
compute svssecurity=1-((A191-1)/5).
end if.
execute.

do if A192>=1 & A192<=6.
compute svshedonismvalue=1-((A192-1)/5).
end if.
execute.

do if A193>=1 & A193<=6.
compute svsprosocial=1-((A193-1)/5).
end if.
execute.


do if A194>=1 & A194<=6.
compute svsprestige=1-((A194-1)/5).
end if.
execute.


do if A195>=1 & A195<=6.
compute svsstimulation=1-((A195-1)/5).
end if.
execute.


do if A196>=1 & A196<=6.
compute svsconformityvalue=1-((A196-1)/5).
end if.
execute.


do if A197>=1 & A197<=6.
compute svsenvironment=1-((A197-1)/5).
end if.
execute.



do if A198>=1 & A198<=6.
compute svstradition=1-((A198-1)/5).
end if.
execute.

compute svsaverageimportance=mean(svsselfdirection, svswealth, svssecurity, svshedonismvalue, svsprosocial, svsprestige, svsstimulation, svsconformityvalue, svsenvironment, svstradition).
execute.




*political attitudes*



do if F120>=1 & F120<=10.
compute abortionok=1-((F120-1)/9).
end if.
execute.


do if F118>=1 & F118<=10.
compute homosexualityok=1-((F118-1)/9).
end if.
execute.

recode C001 (1=1) (2=0) (3=.5) into menrighttojobs.
execute.



do if E143>=1 & E143<=4.
compute immigatt=(E143-1)/3.
end if.
execute.



do if E035>=1 & E035<=10.
compute incomediffs=(E035-1)/9.
end if.
execute.


do if E036>=1 & E036<=10.
compute ownershipbusiness=1-((E036-1)/9).
end if.
execute.


do if E037>=1 & E037<=10.
compute responsibility=1-((E037-1)/9).
end if.
execute.



*scales*

do if homosexualityok>=0&abortionok>=0.
compute cult2i = mean(abortionok, homosexualityok).
end if.
execute.


do if incomediffs>=0&responsibility>=0.
compute sw2i=mean(incomediffs, responsibility).
end if.
execute.


do if politimp>=0&politint>=0.
compute poleng2i=mean(politimp, politint).
end if.
execute.



*schwartz values computations*



COMPUTE selfdirectionminusmean=svsselfdirection-svsaverageimportance.
EXECUTE.

compute wealthminusmean=svswealth-svsaverageimportance.
execute.

compute securityminusmean=svssecurity-svsaverageimportance.
execute.

compute hedonismminusmean=svshedonismvalue-svsaverageimportance.
execute.

compute prosocialminusmean=svsprosocial-svsaverageimportance.
execute.

compute prestigeminusmean=svsprestige-svsaverageimportance.
execute.

compute stimulationminusmean=svsstimulation-svsaverageimportance.
execute.

compute conformityminusmean=svsconformityvalue-svsaverageimportance.
execute.

compute environmentminusmean=svsenvironment-svsaverageimportance.
execute.

compute traditionminusmean=svstradition-svsaverageimportance.
execute.



compute selfdirectionminusmeanrev=selfdirectionminusmean*-1.
execute.

compute stimulationminusmeanrev=stimulationminusmean*-1.
execute.


compute NSC=mean(selfdirectionminusmeanrev, stimulationminusmeanrev, securityminusmean, conformityminusmean, traditionminusmean).
execute.


compute NSC1s=(NSC+.56)/1.16.
execute.



*compute numerical indices without labels*

compute S025number=S025.
execute.


compute S020number=S020.
execute.


compute S003number=S003.
execute.


*to eliminate Rs from surveys without at least one cultural and one economic variable*

RECODE S025 (321984=SYSMIS) (361981=SYSMIS) (1701997=SYSMIS) (2461981=SYSMIS) (3481982=SYSMIS) 
    (3921981=SYSMIS) (4101982=SYSMIS) (4841981=SYSMIS) (5861997=SYSMIS) (7101982=SYSMIS) 
    (7521981=SYSMIS) (7561989=SYSMIS) (8401981=SYSMIS) (ELSE=1) INTO insample.
EXECUTE.

filter off.
 use all.
 select if(not missing(insample)).
 execute.






